/* global authAxios */

export default {
  createAccount (data) {
    return authAxios.post(`${this.apiVersion}/accounts`, data)
  },

  async getAccount () {
    const accountId = window.location.pathname.split('/')[2]
    return authAxios.get(`api/v1/authserver/accounts/${accountId}`)
  },

  async updateAccount (data) {
    const accountId = window.location.pathname.split('/')[2]
    return authAxios.patch(`api/v1/authserver/accounts/${accountId}`, data)
  },
}
